import {api} from "@/utils/request";





//获取所有菜单
export const getMenuListApi = () => {
    return api({
        url: "/sys/menu/getAll",
        method: "get"
    })
}


//增加一级菜单菜单
export const addMenuApi = (data:any) => {
    return api({
        url: "/sys/menu/save",
        method: "post",
        data: data
    })
}



//修改菜单
export const updateMenuApi = (data:any) => {
    return api({
        url: "/sys/menu/updateById",
        method: "put",
        data: data
    })
}

//根据id删除菜单
export const deletedByIdMenuApi = (id:number) => {
    return api({
        url: "/sys/menu/removeById/"+id,
        method: "delete",
    })
}


